; SLIME 2011-02-04 MOD-ASSISTANT
 SU
 OJLD
 SAM
 BEI
 SU-C
 OJLD-B
;Compiler warnings for "/Users/darkh/Dropbox/seed/lisp/math_su.lisp" :
;   In OJLD-B: Unused lexical variable NUM
 PRIME-P
 FIND-NEXT-PRIME
 FIND-PRIME

CL-USER> (prime-p 211)
T
CL-USER> (prime-p 2111)
T
CL-USER> (prime-p 54001)
T
CL-USER> (prime-p 54000)
NIL
CL-USER> (defun fen(n a)
	   (if 
	    (= (mod n a ) 0 )
	    (chai n a 1)
	    (fen n (find-next-prime a))))
;Compiler warnings :
;   In FEN: Undefined function CHAI
FEN
CL-USER> (defun chai (n a  count)
	     (if (not (= (mod n (pow a count )) 0 ))
		 (cons a count)
		 (chai n a (+ count 1))))
;Compiler warnings :
;   In CHAI: Undefined function POW
CHAI
CL-USER> (defun pow (num count )
	      (if (= count 1)
		  num
		  (pow (+ num num) (- count 1))))
POW
CL-USER> (pwo 2 4)
; Evaluation aborted on #<CCL::UNDEFINED-FUNCTION-CALL #x302000B1FB2D>.
CL-USER> (pow  2 4)
256
CL-USER
